package com.cib.icarus.desensitize.annotation;

import com.cib.icarus.core.consts.IcarusGeneralConsts;
import com.cib.icarus.desensitize.strategy.NoneStrategy;

import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


/**
 * 策略模式的敏感信息脱敏注解，
 * 用来指定一个实现了{@link DesAbstractStrategy}的类进行脱敏
 * 如果不指定{@link  StrategyDesensitize#strategy()}，则默认为{@link NoneStrategy}
 *
 * @author goomba
 */
@Inherited
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface StrategyDesensitize {

    Class<? extends DesAbstractStrategy> strategy() default NoneStrategy.class;

    char placeholder() default IcarusGeneralConsts.DEFAULT_PLACEHOLDER_CHAR;

}
